package org.example.design.visitor.test2;

/**
 * @author huangshen
 * @version 0
 * @description ReleaseScoreVisitor
 * @since 2022/2/10 9:44
 */
public class ReleaseScoreVisitor extends StuVisitor {

    /**
     * 访问学霸
     */
    @Override
    void visit(XueBa x) {
        System.out.println(x.getMonth() + "月考试" + x.getType() + "出成绩了，开心");
    }

    /**
     * 访问学渣
     */
    @Override
    void visit(XueZha x) {
        System.out.println(x.getMonth() + "月考试" + x.getType() + "出成绩了，不开心");
    }


}
